import request from '@/utils/request';

export async function query(): Promise<any> {
  return request('/api/users');
}

export async function queryCurrent(): Promise<any> {
  return request('/api/currentUser');
}

export async function queryNotices(): Promise<any> {
  return request('/api/notices');
}

/**
 * 用户信息修改接口
 * @param data
 */
export async function updateByIdUserInfo(data: any) {
  return request('/sealCuttingApi/user/updateByIdUserInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 用户图像修改接口
 * @param data
 */
export async function updateByIdPortrait(data: any) {
  return request('/sealCuttingApi/user/updateByIdPortrait', {
    method: 'POST',
    data,
  });
}

/**
 * 根据手机号和验证码判断验证码是否正确接口
 * @param data
 */
export async function isVerificationCode(params: any) {
  return request('/sealCuttingApi/user/isVerificationCode', {
    params,
  });
}

/**
 * 判断手机号是否存在接口
 * @param data
 */
export async function isMobile(params: any) {
  return request('/sealCuttingApi/user/isMobile', {
    params,
  });
}

/**
 * 查询所有启用用户接口
 * @param data
 */
export async function queryAllUser(params: any): Promise<any> {
  return request('/sealCuttingApi/user/queryAllUser', {
    params,
  });
}
